Optimal. Leaf size=41 \[ A x+\frac{B \sin (c+d x)}{d}+\frac{C \sin (c+d x) \cos (c+d x)}{2 d}+\frac{C x}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0246001, antiderivative size = 41, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.15, Rules used = {2637, 2635, 8} \[ A x+\frac{B \sin (c+d x)}{d}+\frac{C \sin (c+d x) \cos (c+d x)}{2 d}+\frac{C x}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2637
Rule 2635
Rule 8
Rubi steps
\begin{align*} \int \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx &=A x+B \int \cos (c+d x) \, dx+C \int \cos ^2(c+d x) \, dx\\ &=A x+\frac{B \sin (c+d x)}{d}+\frac{C \cos (c+d x) \sin (c+d x)}{2 d}+\frac{1}{2} C \int 1 \, dx\\ &=A x+\frac{C x}{2}+\frac{B \sin (c+d x)}{d}+\frac{C \cos (c+d x) \sin (c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.0443743, size = 55, normalized size = 1.34 \[ A x+\frac{B \sin (c) \cos (d x)}{d}+\frac{B \cos (c) \sin (d x)}{d}+\frac{C (c+d x)}{2 d}+\frac{C \sin (2 (c+d x))}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 43, normalized size = 1.1 \begin{align*} Ax+{\frac{B\sin \left ( dx+c \right ) }{d}}+{\frac{C}{d} \left ({\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.00092, size = 51, normalized size = 1.24 \begin{align*} A x + \frac{{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C}{4 \, d} + \frac{B \sin \left (d x + c\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.84824, size = 82, normalized size = 2. \begin{align*} \frac{{\left (2 \, A + C\right )} d x +{\left (C \cos \left (d x + c\right ) + 2 \, B\right )} \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.277103, size = 66, normalized size = 1.61 \begin{align*} A x + B \left (\begin{cases} \frac{\sin{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\x \cos{\left (c \right )} & \text{otherwise} \end{cases}\right ) + C \left (\begin{cases} \frac{x \sin ^{2}{\left (c + d x \right )}}{2} + \frac{x \cos ^{2}{\left (c + d x \right )}}{2} + \frac{\sin{\left (c + d x \right )} \cos{\left (c + d x \right )}}{2 d} & \text{for}\: d \neq 0 \\x \cos ^{2}{\left (c \right )} & \text{otherwise} \end{cases}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.18851, size = 47, normalized size = 1.15 \begin{align*} \frac{1}{4} \, C{\left (2 \, x + \frac{\sin \left (2 \, d x + 2 \, c\right )}{d}\right )} + A x + \frac{B \sin \left (d x + c\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]